<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../dt/css/common.css" rel="stylesheet" type="text/css" />
<link href="../dt/css/sty.css" rel="stylesheet" type="text/css" />
<script  src="../dt/js/jquery-1.7.2.js"></script>
<script src="../dt/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script src="../dt/js/common_js.js" type="text/javascript"></script>
<title>网站首页</title>
</head>
<style type="text/css">
	#navs{
		width:1200px;
		margin:auto;
		border:2px solid #ddd;
		margin-bottom:30px;
	}
	#navs-head{
		font-weight:bolder;
		font-size:20px;
	}
	#navs-ul>li>a{
		text-decoration:none;
		color:black;
		font-size:15px;
	}
	#navs-ul>li{
		float:left;
		padding:7px;
		position:relative;
		left:0px;
		top:0px;
	}
	.d{
		border:1px solid #189C1F;
		width:24%;
		height:200px;
		display:none;
		position: fixed;
		background-color:#FFFFFF ;
		z-index:1;
	}
   .d>#t{
		list-style: none;
		padding:5px;
		float: left;
	}
	.Plate_style{
		width:1200px;
		margin:auto;
	}
	#slogan {
			position: relative;
			top: 0px;
			left: 45px;
			height: 80px;
			width: 1000px;
			margin: auto;
		}
		
	#slogan_one {
		font-size: 25px;
		margin-left: 70px;
	}
	
	#slogan_two {
		font-weight: bolder;
		font-size: 28px;
		color: red;
	}
</style>
<script type="text/javascript">
$(function(){
	$("#searchName,.d").focus(function(){
		$(".d").css("display","block");
	})
	$("#searchName,.d").blur(function(){
		$(".d").css("display","none");
	})
	
});
function ins(){
	$(function(){
		$(".d").find("li").each(function(ec){
			var text =$(this).text();
			var val =$("#searchName").val();
			if(text.indexOf(val) > -1){
				$(this).css("display","block");
			}else{
				$(this).css("display","none");
			}
		})
	});
}	
${message}
</script>
<body>
 <div id="header_top">
	  <div id="top">
	    <div class="Inside_pages">
			<div class="hd_top_manu clearfix">
			  <ul class="clearfix">
			   	<li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/dt/index.do">我的首页</a></li> 
			   	<c:if test="${name == null || name == ''}">
				    <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/dt/login.htm">登录${name }</a></li> 
				    <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/dt/reg.htm">注册</a></li> 
			    </c:if>
			    <c:if test="${name != null || name != ''}">
			    	 <li class="hd_menu_tit" data-addclass="hd_menu_hover">${name}</li>
			    	  <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="logout.do">退出</a></li>
			    </c:if>
			  </ul>
			</div>
	    </div>
	  </div>
  <div id="header"  class="header page_style">
 	 <div class="logo"><a href="/dt/index.html"><img src="../dt/img/logo.jpg" style="width: 100px;height: 100px;"/></a></div>
  <!--结束图层-->
  	<div class="Search">
        <div class="search_list">
            <ul>
                <li class="current"><a href="#">产品</a></li>
            </ul>
        </div>
        <div class="clear search_cur">
	        <form action="/dt/queryGoodName.do">
	           <input name="goodName" id="searchName" class="search_box" onkeyup="ins()" type="text">
	           <input name="" type="submit" value="搜 索"  class="Search_btn"/>
	            <ul class="d">
					<c:forEach items="${shopping }" var="shop">
						<li id="t"><a href="/dt/good/single.do?id=${shop.id }">${shop.goodName }</a></li>
					</c:forEach>
				</ul>
			</form>
        </div>
        <div class="clear hotword">热门搜索词：
        <a href="/dt/queryGoodName.do?goodName=优质早稻米">优质早稻米</a>&nbsp;&nbsp;&nbsp;
        <a href="/dt/queryGoodName.do?goodName=优质晚稻米">优质晚稻米</a>&nbsp;&nbsp;&nbsp;
        <a href="/dt/queryGoodName.do?goodName=优质晚香米">优质晚香米</a>&nbsp;&nbsp;&nbsp;
        <a href="/dt/queryGoodName.do?goodName=有机大米">有机大米</a>&nbsp;&nbsp;&nbsp;
       <a href="/dt/queryGoodName.do?goodName=糯米"> 糯米</a>&nbsp;&nbsp;&nbsp;
        副产品</div>
	</div>
	 <!--购物车样式-->
	 <div class="hd_Shopping_list" id="Shopping_list">
		 <div class="Shopping_style"></div>	 
	  </div>
	</div>
<!--菜单栏-->
	<div class="Navigation" id="Navigation">
		 <ul class="Navigation_name">
            <li class="hour"><span class="bg_muen"></span><a href="/dt/que.do" style="padding:27px">首页</a></li>
		 </ul>			 
	</div>
	<script>$("#Navigation").slide({titCell:".Navigation_name li",trigger:"click"});</script>
</div>
</head>
<!--广告幻灯片样式-->
   	<div id="slideBox" class="slideBox">
			<div class="hd">
				<ul class="smallUl"></ul>
			</div>
			<div class="bd">
				<ul>
				<c:forEach items="${shop1}" var="shopTmp">
					<li><a href="/dt/queryGoodName.do?goodName=${shopTmp.goodName }"><div style="background:url(${shopTmp.url}) no-repeat; background-position:center; width:100%; height:450px;background-size: 100%;"></div></a></li>
				</c:forEach>
				</ul>
			</div>
			<!-- 下面是前/后按钮-->
			<a class="prev" href="javascript:void(0)"></a>
			<a class="next" href="javascript:void(0)"></a>

		</div>
		<script type="text/javascript">
		jQuery(".slideBox").slide({titCell:".hd ul",mainCell:".bd ul",autoPlay:true,autoPage:true});
		</script>
<!--内容样式-->
<div id="mian">
  <div class="clearfix marginbottom">
	  <!--产品栏切换-->
  	<div class="product_list left">
  		<div class="slideGroup">
			<div class="parHd">
				<ul><li>新品上市</ul>
			</div>
			<div class="parBd">
					<c:if test="${shop == '' || shop == null }"><h1 align="center">暂无新品</h1></c:if>
					<div class="slideBoxs">
						<a class="sPrev" href="javascript:void(0)"></a>
						<ul>
							<c:forEach items="${shop}" var="shopTmp">
							<li>
								<div class="pic"><a href="/dt/good/single.do?id=${shopTmp.id }"><img src="${shopTmp.url }" /></a></div>
								<div class="title">
                                <a href="#" target="_blank" class="name">${shopTmp.goodName}</a>
					             <h3>
							     <c:if test="${shopTmp.price == shopTmp.nowPrice}">
							     	  <b>原价￥</b>${shopTmp.price }  
							     </c:if>
							      <c:if test="${shopTmp.price != shopTmp.nowPrice}">
							     	  <b>原价￥</b>${shopTmp.price }  
							     	  <b> 现价￥</b>${shopTmp.nowPrice }
							     </c:if>
							     </h3>
                                </div>
							</li>
							</c:forEach>
						</ul>
						<a class="sNext" href="javascript:void(0)"></a>
						<div style=" float:right;position:relative;top:-200px;left:-50px;font-size:19px; padding:10px;width:200px;border:1px solid rgb(246, 250, 235);color:#666;height:180px"><img alt=""  src="/dt/img/586dffdb1bc68046833741e1d4749a76.png" style="width:200px;height:180px"></div>
					</div><!-- slideBox End -->
			</div><!-- parBd End -->
		</div>
        <script type="text/javascript">
			/* 内层图片无缝滚动 */
			jQuery(".slideGroup .slideBoxs").slide({ mainCell:"ul",vis:4,prevCell:".sPrev",nextCell:".sNext",effect:"leftMarquee",interTime:50,autoPlay:true,trigger:"click"});
			/* 外层tab切换 */
			jQuery(".slideGroup").slide({titCell:".parHd li",mainCell:".parBd"});
		</script>
  	</div>
   </div>
 </div>
<div id="navs">
	<ul id="navs-ul">
		<li id="navs-head">品牌：</li>
		<li ><img src="/dt/img/logo.jpg" style="height:200px;width:500px;margin-left:250px"></li>
	</ul>
	<ul id="navs-ul">
		<li id="navs-head">大米：</li>
		<li ><a href="/dt/queryGoodName.do?goodName=优质大米" >优质大米 </a></li>
		<li ><a href="/dt/queryGoodName.do?goodName=有机" >有机 </a></li>
		<li ><a href="/dt/queryGoodName.do?goodName=糯米" >糯米 </a></li>
		<li ><a href="/dt/queryGoodName.do?goodName=小米" >小米  </a></li>
		<li ><a href="/dt/queryGoodName.do?goodName=一级天龙米" >一级天龙米  </a></li>  
		<li ><a href="/dt/queryGoodName.do?goodName=湖北米" >湖北米  </a></li>
		<li ><a href="/dt/queryGoodName.do?goodName=巴基斯坦米" >巴基斯坦米  </a></li>
	</ul>
</div>
 <!--板块栏目样式-->
 <div class="clearfix Plate_style">
    <div class="Plate_column Plate_column_left">
	    <div class="Plate_product">
		    <ul id="lists">
		    <c:if test="${shop2 == '' || shop2 == null }"><h1  align="center">暂无这类商品</h1></c:if>
		      <c:forEach items="${shop2}" var="shopTmp">
		     <li class="product_display">
		     <a href="/dt/addShopping.do?goodName=${shopTmp.goodName}&count=1&nowPrice=${shopTmp.nowPrice}" class="Collect"><em></em>添加到购物车</a>
		     <a href="/dt/good/single.do?id=${shopTmp.id }" class="img_link"><img src="${shopTmp.url }"  width="140" height="140"/></a>
		     <a href="#" class="name">${shopTmp.goodName }</a>
		     <h3>
		     <c:if test="${shopTmp.price == shopTmp.nowPrice}">
		     	  <b>原价￥</b>${shopTmp.price }  
		     </c:if>
		      <c:if test="${shopTmp.price != shopTmp.nowPrice}">
		     	  <b>原价￥</b>${shopTmp.price }  
		     	  <b> 现价￥</b>${shopTmp.nowPrice }
		     </c:if>
		     </h3>
		    <div class="Detailed">
			   <div class="content">
				  <p class="center"><a href="/dt/query.do?goodName=${shopTmp.goodName }&nowPrice=${shopTmp.nowPrice }&count=1&id=${shopTmp.id }" class="Buy_btn">立即购买</a></p>
				  </div>
			   </div>
		     </li>
		      </c:forEach>
		    </ul>
	   </div>
    </div>
  </div>
  <div id="slogan">
		<span id="slogan_one"><b id="slogan_two">优</b> 品种优良</span>
		<span id="slogan_one"><b  id="slogan_two">绿</b> 绿色健康</span>
		<span id="slogan_one"><b  id="slogan_two">精</b> 米中精品</span>
		<span id="slogan_one"><b  id="slogan_two">香</b> 优选五谷香</span>
	</div>
</body>
</html>